﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Kokomo.PeInspector.Reflection.Disassembly
{
	/// <summary>
	/// Specifies how a type is used from MSIL.
	/// </summary>
	public enum MsilTypeUsage
	{
		/// <summary>
		/// Other (doesn't match any other entry)
		/// </summary>
		Other,
		/// <summary>
		/// Unspecified type reference.
		/// </summary>
		Reference,
		/// <summary>
		/// Type instantiation (including constructor invocation)
		/// </summary>
		Instantiation,
		/// <summary>
		/// Array element
		/// </summary>
		Array,
		/// <summary>
		/// Parameter declaration
		/// </summary>
		ParameterDeclaration,
		/// <summary>
		/// Local variable declaration
		/// </summary>
		LocalDeclaration,
		/// <summary>
		/// Method return value
		/// </summary>
		ReturnValue,
		/// <summary>
		/// Generic parameter (when a generic type is defined)
		/// </summary>
		Generic,
		/// <summary>
		/// Generic argument (when a generic type is instantiated)
		/// </summary>
		GenericArgument,
		/// <summary>
		/// Cast or conversion
		/// </summary>
		Conversion,
		/// <summary>
		/// Member declared by the type
		/// </summary>
		MemberAccess,
		/// <summary>
		/// Implements an interface
		/// </summary>
		Implements,
		/// <summary>
		/// Extends a type
		/// </summary>
		Extends,
		/// <summary>
		/// Extends a type
		/// </summary>
		Extension,
		/// <summary>
		/// Used as an attribute
		/// </summary>
		Attribute,
		/// <summary>
		/// Thrown as an exception
		/// </summary>
		Thrown,
	}
}
